package testing.seperator;

import static org.junit.Assert.assertEquals;

import org.junit.Before;
import org.junit.Test;

import seperator.AWLSeperator;
import seperator.NumberSeperator;
import words.AWL;
import words.NumberStat;


public class NumberSeperatorTest {
	NumberSeperator seperator;
	NumberStat num;
	
	@Before
	public void setUp() throws Exception {
		this.seperator = new NumberSeperator();
		
	}
	
	@Test
	public void test1()
	{
		String[] data = {"The","number","of","population","in","the","city","is","10000"};
		seperator.setdata(data);
		seperator.seperate();
		num = seperator.getResult();
		int result = num.getStringArray().length;
		assertEquals(result,1);
	}
	
	@Test
	public void test2()
	{
		String[] data = {"The","number","of","population","in","the","city","is",",10000"};
		seperator.setdata(data);
		seperator.seperate();
		num = seperator.getResult();
		int result = num.getStringArray().length;
		assertEquals(result,0);
	}
	
	@Test
	public void test3()
	{
		String[] data = {"The","number","of","population","in","the","city","is","10000","and","10000"};
		seperator.setdata(data);
		seperator.seperate();
		num = seperator.getResult();
		int result = num.getStringArray().length;
		assertEquals(result,2);
	}
	
	@Test
	public void test4()
	{
		String[] data = {"The","number","of","population","in","the","city","is","10,000","and","10,000"};
		seperator.setdata(data);
		seperator.seperate();
		num = seperator.getResult();
		int result = num.getStringArray().length;
		assertEquals(result,0);
	}
}
